                            # 7.1 函数input()的工作原理
message = input( "Tell me something, and I will repeat it back to you: " )
print(message)

# 7.1.1 编写清晰的程序
name = input("Please enter your name: ")
print("Hello, " + name + "!")

prompt = "If your tell us who you are, we can personalize the messages you see."
prompt += "\nWhat is your first name? Please enter here: "
name = input(prompt)
print("Hello, " + name + "!")
# 7.1.2 使用int()来获取数值输入
age = input("How old are you? ")
age = int(age)
print(age >= 18)

# 判断一个人是否满足坐过山车的身高要求
height = input("How tall are you, in inches? ")
height = int(height)
if height >= 36:
    print("\nYou're tall enough to ride!")
else:
    print("\nYou'll be able to ride when you're a little older.")
# 7.1.3 求模运算符
    # “%”将两个数相除并返回余数
# 判断一个数是奇数还是偶数
number = int(input("Enter a number, and I'll tell you if it's even or odd: "))
if number % 2 == 0:
    print("\nThe number " + str(number) + " is even.")
else:
    print("\nThe number " + str(number) + " is odd.")